package com.wuliupai.delivery.wuliupaidelivery.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Class:订单实体类
 * Created by KANG on 2016/11/16  09:59.
 * Email:khl8912@126.com
 */
public class OrderBean extends BaseBean implements Parcelable {

    private String s_i;
    private String count;
    private String orderCode;//订单号
    private String orderId;//订单id
    private String consignorName;//发货人姓名
    private String consignorMobile;//发货人手机号
    private String consigneeName;//收货人姓名
    private String consigneeMobile;//收货人手机号
    private String startProvince;//出发地省
    private String startCity;//出发地市
    private String startArea;//出发地县
    private String startAddress;//出发地详细地址
    private String endProvince;//目的地省
    private String endCity;//目的地市
    private String endArea;//目的地县
    private String endAddress;//目的地详细地址
    private String goodsName;//货物名称
    private String goodsWeight;//货物重量
    private String goodsVolume;//货物体积

    private String startGpsX;//
    private String startGpsY;//
    private String endGpsX;//
    private String endGpsY;//

    private String areaName;


    private String salesman; // 业务员姓名

    /**
     * 目的仓的名称
     */
    private String endWarehouseName;

    /**
     * 抢单时使用
     */
    private String warehouseId;
    private String collectGoods; // 0-揽收，1-派送

    /**
     * 运费
     * 应付费用
     */
    private String dealPrice;//运费

    /**
     * 已付费用
     */
    private String actualMoney;

    /**
     * 该任务是否完成
     * 0未完成
     * 1已完成
     */
    private String completed;

    private String remarks;//备注
    private String payType;//支付方式
    private String status;//订单状态
    private String refreshTime;//下单时间
    private String type;//订单类型（0全部，1收件，2送件）
    private String gps_x;//经度
    private String gps_y;//纬度
    private String goodsCount;//件数
    private String calculateType;//用戶类型

    private String sProvinceCityArea;
    private String rProvinceCityArea;

    //任务列表
    private String consignorCount;//发货件数
    private String consigneeCount;//收货件数
    private String address;//任务记录列表展示的地址

    //    private String selfPickUp;// 自提    0不自提1自提
//    private String selfSend;// 自送    0不自送1自送
    private String selfPickUpFreight;// 自提费
    private String selfSendFreight;// 自送费


    // ---------------------- 收发货信息时使用---------------

    private String provinceCode;//	省的代码
    private String cityCode;//	市的代码
    private String cityName;//	市
    private String areaCode;//	县的代码
    //    private String address;//
    private String id;//常用地址id
    private String name;//
    private String mobile;//

    // ---------------------- 收发货信息时使用---------------


    // ---------------------- 取消任务使用---------------
    /**
     * 任务id
     */
    private String missionId;
    /**
     * 是否已取消
     * 2：已经取消
     */
    private String confirm;
    /**
     * 取消的原因
     * 车辆故障：label1
     * 车已装满：label2
     * 车辆限行：label3
     * 其他：传输入的文本即可
     */
    private String confirmRemarks;
    // ---------------------- 取消任务使用---------------

    /**
     * 添加常用地址
     *
     * @param provinceCode
     * @param cityCode
     * @param areaCode
     * @param address
     * @param name
     * @param mobile
     */
    public OrderBean(String provinceCode, String cityCode, String areaCode,
                     String address, String name, String mobile) {
        this.provinceCode = provinceCode;
        this.cityCode = cityCode;
        this.areaCode = areaCode;
        this.address = address;
        this.name = name;
        this.mobile = mobile;
    }

    /**
     * 应付总额
     */
    private String freight;

    public List<OrderBean> infolist;

    public OrderBean() {
        super();

    }

    /**
     * 确认收货
     *
     * @param orderCode
     * @param gps_x
     * @param gps_y
     */
    public OrderBean(String orderCode, String gps_x, String gps_y) {
        super();
        this.orderCode = orderCode;
        this.gps_x = gps_x;
        this.gps_y = gps_y;
    }

    /**
     * 获取列表
     *
     * @param s_i
     * @param count
     */
    public OrderBean(String s_i, String count) {
        super();
        this.s_i = s_i;
        this.count = count;
    }

    /**
     * 获取订单详情
     *
     * @param orderId 订单id
     */
    public OrderBean(String orderId) {
        super();
        this.orderId = orderId;
    }

    //下单
    public OrderBean(String consignorName, String consignorMobile, String consigneeName, String consigneeMobile, String startProvince, String startCity,
                     String startArea, String startAddress, String endProvince, String endCity, String endArea, String endAddress, String goodsName, String goodsWeight,
                     String goodsVolume, String dealPrice, String remarks, String payType, String status, String gps_x,
                     String gps_y, String goodsCount, String calculateType) {
        super();
        this.consignorName = consignorName;
        this.consignorMobile = consignorMobile;
        this.consigneeName = consigneeName;
        this.consigneeMobile = consigneeMobile;
        this.startProvince = startProvince;
        this.startCity = startCity;
        this.startArea = startArea;
        this.startAddress = startAddress;
        this.endProvince = endProvince;
        this.endCity = endCity;
        this.endArea = endArea;
        this.endAddress = endAddress;
        this.goodsName = goodsName;
        this.goodsWeight = goodsWeight;
        this.goodsVolume = goodsVolume;
        this.dealPrice = dealPrice;
        this.remarks = remarks;
        this.payType = payType;
        this.status = status;
        this.gps_x = gps_x;
        this.gps_y = gps_y;
        this.goodsCount = goodsCount;
        this.calculateType = calculateType;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAreaName() {
        return areaName;
    }

    public String getCollectGoods() {
        return collectGoods;
    }

    public void setCollectGoods(String collectGoods) {
        this.collectGoods = collectGoods;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getStartGpsX() {
        return startGpsX;
    }

    public void setStartGpsX(String startGpsX) {
        this.startGpsX = startGpsX;
    }

    public String getStartGpsY() {
        return startGpsY;
    }

    public void setStartGpsY(String startGpsY) {
        this.startGpsY = startGpsY;
    }

    public String getEndGpsX() {
        return endGpsX;
    }

    public void setEndGpsX(String endGpsX) {
        this.endGpsX = endGpsX;
    }

    public String getEndGpsY() {
        return endGpsY;
    }

    public void setEndGpsY(String endGpsY) {
        this.endGpsY = endGpsY;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getConfirm() {
        return confirm;
    }

    public void setConfirm(String confirm) {
        this.confirm = confirm;
    }

    public String getEndWarehouseName() {
        return endWarehouseName;
    }

    public void setEndWarehouseName(String endWarehouseName) {
        this.endWarehouseName = endWarehouseName;
    }

    public String getConfirmRemarks() {
        return confirmRemarks;
    }

    public void setConfirmRemarks(String confirmRemarks) {
        this.confirmRemarks = confirmRemarks;
    }

    public String getCompleted() {
        return completed;
    }

    public void setCompleted(String completed) {
        this.completed = completed;
    }

    public String getMissionId() {
        return missionId;
    }

    public void setMissionId(String missionId) {
        this.missionId = missionId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getActualMoney() {
        return actualMoney;
    }

    public void setActualMoney(String actualMoney) {
        this.actualMoney = actualMoney;
    }

    public String getSelfPickUpFreight() {
        return selfPickUpFreight;
    }

    public void setSelfPickUpFreight(String selfPickUpFreight) {
        this.selfPickUpFreight = selfPickUpFreight;
    }

    public String getSelfSendFreight() {
        return selfSendFreight;
    }

    public void setSelfSendFreight(String selfSendFreight) {
        this.selfSendFreight = selfSendFreight;
    }

    public String getS_i() {
        return s_i;
    }

    public void setS_i(String s_i) {
        this.s_i = s_i;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getConsignorName() {
        return consignorName;
    }

    public void setConsignorName(String consignorName) {
        this.consignorName = consignorName;
    }

    public String getConsignorMobile() {
        return consignorMobile;
    }

    public void setConsignorMobile(String consignorMobile) {
        this.consignorMobile = consignorMobile;
    }

    public String getConsigneeName() {
        return consigneeName;
    }

    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    public String getConsigneeMobile() {
        return consigneeMobile;
    }

    public void setConsigneeMobile(String consigneeMobile) {
        this.consigneeMobile = consigneeMobile;
    }

    public String getStartProvince() {
        return startProvince;
    }

    public void setStartProvince(String startProvince) {
        this.startProvince = startProvince;
    }

    public String getStartCity() {
        return startCity;
    }

    public void setStartCity(String startCity) {
        this.startCity = startCity;
    }

    public String getStartArea() {
        return startArea;
    }

    public void setStartArea(String startArea) {
        this.startArea = startArea;
    }

    public String getStartAddress() {
        return startAddress;
    }

    public void setStartAddress(String startAddress) {
        this.startAddress = startAddress;
    }

    public String getEndProvince() {
        return endProvince;
    }

    public void setEndProvince(String endProvince) {
        this.endProvince = endProvince;
    }

    public String getEndCity() {
        return endCity;
    }

    public void setEndCity(String endCity) {
        this.endCity = endCity;
    }

    public String getEndArea() {
        return endArea;
    }

    public void setEndArea(String endArea) {
        this.endArea = endArea;
    }

    public String getEndAddress() {
        return endAddress;
    }

    public void setEndAddress(String endAddress) {
        this.endAddress = endAddress;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsWeight() {
        return goodsWeight;
    }

    public void setGoodsWeight(String goodsWeight) {
        this.goodsWeight = goodsWeight;
    }

    public String getGoodsVolume() {
        return goodsVolume;
    }

    public void setGoodsVolume(String goodsVolume) {
        this.goodsVolume = goodsVolume;
    }

    public String getDealPrice() {
        return dealPrice;
    }

    public void setDealPrice(String dealPrice) {
        this.dealPrice = dealPrice;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRefreshTime() {
        return refreshTime;
    }

    public void setRefreshTime(String refreshTime) {
        this.refreshTime = refreshTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getGps_x() {
        return gps_x;
    }

    public void setGps_x(String gps_x) {
        this.gps_x = gps_x;
    }

    public String getGps_y() {
        return gps_y;
    }

    public void setGps_y(String gps_y) {
        this.gps_y = gps_y;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getGoodsCount() {
        return goodsCount;
    }

    public void setGoodsCount(String goodsCount) {
        this.goodsCount = goodsCount;
    }

    public String getCalculateType() {
        return calculateType;
    }

    public void setCalculateType(String calculateType) {
        this.calculateType = calculateType;
    }

    public String getsProvinceCityArea() {
        return sProvinceCityArea;
    }

    public void setsProvinceCityArea(String sProvinceCityArea) {
        this.sProvinceCityArea = sProvinceCityArea;
    }

    public String getrProvinceCityArea() {
        return rProvinceCityArea;
    }

    public void setrProvinceCityArea(String rProvinceCityArea) {
        this.rProvinceCityArea = rProvinceCityArea;
    }

    public String getConsignorCount() {
        return consignorCount;
    }

    public void setConsignorCount(String consignorCount) {
        this.consignorCount = consignorCount;
    }

    public String getConsigneeCount() {
        return consigneeCount;
    }

    public void setConsigneeCount(String consigneeCount) {
        this.consigneeCount = consigneeCount;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getSalesman() {
        return salesman;
    }

    public void setSalesman(String salesman) {
        this.salesman = salesman;
    }

    public String getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(String warehouseId) {
        this.warehouseId = warehouseId;
    }

    //    public String getSelfPickUp() {
//        return selfPickUp;
//    }
//
//    public void setSelfPickUp(String selfPickUp) {
//        this.selfPickUp = selfPickUp;
//    }
//
//    public String getSelfSend() {
//        return selfSend;
//    }
//
//    public void setSelfSend(String selfSend) {
//        this.selfSend = selfSend;
//    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.s_i);
        dest.writeString(this.count);
        dest.writeString(this.orderCode);
        dest.writeString(this.orderId);
        dest.writeString(this.consignorName);
        dest.writeString(this.consignorMobile);
        dest.writeString(this.consigneeName);
        dest.writeString(this.consigneeMobile);
        dest.writeString(this.startProvince);
        dest.writeString(this.startCity);
        dest.writeString(this.startArea);
        dest.writeString(this.startAddress);
        dest.writeString(this.endProvince);
        dest.writeString(this.endCity);
        dest.writeString(this.endArea);
        dest.writeString(this.endAddress);
        dest.writeString(this.goodsName);
        dest.writeString(this.goodsWeight);
        dest.writeString(this.goodsVolume);
        dest.writeString(this.startGpsX);
        dest.writeString(this.startGpsY);
        dest.writeString(this.endGpsX);
        dest.writeString(this.endGpsY);
        dest.writeString(this.areaName);
        dest.writeString(this.salesman);
        dest.writeString(this.endWarehouseName);
        dest.writeString(this.warehouseId);
        dest.writeString(this.collectGoods);
        dest.writeString(this.dealPrice);
        dest.writeString(this.actualMoney);
        dest.writeString(this.completed);
        dest.writeString(this.remarks);
        dest.writeString(this.payType);
        dest.writeString(this.status);
        dest.writeString(this.refreshTime);
        dest.writeString(this.type);
        dest.writeString(this.gps_x);
        dest.writeString(this.gps_y);
        dest.writeString(this.goodsCount);
        dest.writeString(this.calculateType);
        dest.writeString(this.sProvinceCityArea);
        dest.writeString(this.rProvinceCityArea);
        dest.writeString(this.consignorCount);
        dest.writeString(this.consigneeCount);
        dest.writeString(this.address);
        dest.writeString(this.selfPickUpFreight);
        dest.writeString(this.selfSendFreight);
        dest.writeString(this.provinceCode);
        dest.writeString(this.cityCode);
        dest.writeString(this.cityName);
        dest.writeString(this.areaCode);
        dest.writeString(this.id);
        dest.writeString(this.name);
        dest.writeString(this.mobile);
        dest.writeString(this.missionId);
        dest.writeString(this.confirm);
        dest.writeString(this.confirmRemarks);
        dest.writeString(this.freight);
        dest.writeTypedList(this.infolist);
    }

    protected OrderBean(Parcel in) {
        this.s_i = in.readString();
        this.count = in.readString();
        this.orderCode = in.readString();
        this.orderId = in.readString();
        this.consignorName = in.readString();
        this.consignorMobile = in.readString();
        this.consigneeName = in.readString();
        this.consigneeMobile = in.readString();
        this.startProvince = in.readString();
        this.startCity = in.readString();
        this.startArea = in.readString();
        this.startAddress = in.readString();
        this.endProvince = in.readString();
        this.endCity = in.readString();
        this.endArea = in.readString();
        this.endAddress = in.readString();
        this.goodsName = in.readString();
        this.goodsWeight = in.readString();
        this.goodsVolume = in.readString();
        this.startGpsX = in.readString();
        this.startGpsY = in.readString();
        this.endGpsX = in.readString();
        this.endGpsY = in.readString();
        this.areaName = in.readString();
        this.salesman = in.readString();
        this.endWarehouseName = in.readString();
        this.warehouseId = in.readString();
        this.collectGoods = in.readString();
        this.dealPrice = in.readString();
        this.actualMoney = in.readString();
        this.completed = in.readString();
        this.remarks = in.readString();
        this.payType = in.readString();
        this.status = in.readString();
        this.refreshTime = in.readString();
        this.type = in.readString();
        this.gps_x = in.readString();
        this.gps_y = in.readString();
        this.goodsCount = in.readString();
        this.calculateType = in.readString();
        this.sProvinceCityArea = in.readString();
        this.rProvinceCityArea = in.readString();
        this.consignorCount = in.readString();
        this.consigneeCount = in.readString();
        this.address = in.readString();
        this.selfPickUpFreight = in.readString();
        this.selfSendFreight = in.readString();
        this.provinceCode = in.readString();
        this.cityCode = in.readString();
        this.cityName = in.readString();
        this.areaCode = in.readString();
        this.id = in.readString();
        this.name = in.readString();
        this.mobile = in.readString();
        this.missionId = in.readString();
        this.confirm = in.readString();
        this.confirmRemarks = in.readString();
        this.freight = in.readString();
        this.infolist = in.createTypedArrayList(OrderBean.CREATOR);
    }

    public static final Creator<OrderBean> CREATOR = new Creator<OrderBean>() {
        @Override
        public OrderBean createFromParcel(Parcel source) {
            return new OrderBean(source);
        }

        @Override
        public OrderBean[] newArray(int size) {
            return new OrderBean[size];
        }
    };
}